Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[papi] Add UserService/UpdateUser to proto #19163

Merged
merged 2 commits into from
Nov 29, 2023
Merged

Conversation

AlexTugarev
Copy link
Member

Description

This PR just adds UserService/UpdateUser.

The attributes needs to be modifiable were identified in #19142.

How to test

Documentation

Preview status

gitpod:summary

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@AlexTugarev AlexTugarev force-pushed the at/papi-adduser-proto branch from 985859f to 4846ad6 Compare November 29, 2023 11:10
}
repeated WorkspaceAutostartOption workspace_autostart_options = 8;
message WorkspaceAutostartOption {
string clone_url = 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all properties should be optional then

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akosyakov the workspace_autostart_options is a repeated field. The way you would update it is to provide a complete new array of values of type WorkspaceAutostartOption. Signaling optional here would suggest the system could update an individual entry by specifying a diff, but how should that be implemented?
The simpler solution is, if workspace_autostart_options is not provided (it's optional anyways), we're not touching this in persistent state. If it's an empty array, we reset the state. If there are entries, we store this as new state.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed to move it out to own SetWorkspaceAutostartOptions which is not partial and support current dashboard.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved via 1a0632b

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to unblock


// SetWorkspaceAutoStartOptions updates the auto start options for the Gitpod Dashboard.
// +internal - only used by the Gitpod Dashboard.
rpc SetWorkspaceAutoStartOptions(SetWorkspaceAutoStartOptionsRequest) returns (SetWorkspaceAutoStartOptionsResponse) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this method? I thought autoStart option is not useful, and can cause some confuse for me (Once saw that we want to remove it, I'm happy with that Closed PR XD, but closed already).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not aware of removing auto start. Do we have an issue or any discussion on that?

Copy link
Contributor

@mustard-mh mustard-mh Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @AlexTugarev , this is not-blocking comment.

This is the PR to remove auth start option. I'm not clear if we want to keep it or remove it.

update: I just prefer to remove the auto start options

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still used to preserve the options for the next workspace start.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, there is the autostart options to the prefixed URL.

optional WorkspaceTimeoutSettings workspace_timeout_settings = 8;
message WorkspaceTimeoutSettings {
optional google.protobuf.Duration inactivity = 1;
optional bool disabled_disconnected = 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have another workspace timeout in Refind workspace proto PR https://github.com/gitpod-io/gitpod/pull/19138/files#diff-393d8178f08b8814eea780cf779ac93bc55fd0b90588e907a825cbb51de9f33aR250

Should them be aligned?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's align them in implementation PR.
TBH, this is already confusing enough. Changed that already twice, and it's unclear how to map them. In the beginning we'll need to map them in order to maintain compatibility in FE shim, right?

Here I did the bare minimum for the conversion.
https://github.com/gitpod-io/gitpod/pull/19142/files#diff-8fdb520274403fe903bd0ad9c9094f3951b4940b9cf838aa5c36b6548f9aafbdR964-R967

Happy to align, if there is an example for the conversion available.

Copy link
Contributor

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments

Approve to unblock, we could still update proto in implement PRs

@AlexTugarev
Copy link
Member Author

/unhold

@roboquat roboquat merged commit 88d65c1 into main Nov 29, 2023
16 checks passed
@roboquat roboquat deleted the at/papi-adduser-proto branch November 29, 2023 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants